[][src]Crate terminal_clipboard

terminal-clipboard is a cross-platform clipboard library focused on strings copy and paste in the terminal:

  • it's cross-compilation friendly
  • it's tested on macos, linux, windows
  • it doesn't support Wayland (because you're in the terminal)
  • it doesn't handle other types of objects than strings
  • it doesn't handle non UTF8 strings

It exposes only two functions, one for reading the clipboard as a string, another one to fill it from a string:

use terminal_clipboard;
let test = "TEST";
terminal_clipboard::set_string(test).unwrap();
assert_eq!(test, terminal_clipboard::get_string().unwrap());

Structs

ClipboardError

Functions

get_string
set_string